
#include <assert.h>
#include "cmd_obj.h"
#include "storagedao_stub4app.h"
#include "storagedao_req_resp.h"


using namespace erp::storage::dao;

	
	uint32_t CStorageDaoStub4App::AddDisassembleBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CDisassembleBillDdo& DisassembleBillInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& DisassembleBillSysNo
	)
	{
	    CStorageDaoAddDisassembleBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.DisassembleBillInfo = DisassembleBillInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
			oReq.DisassembleBillSysNo = DisassembleBillSysNo;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDDISASSEMBLEBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDDISASSEMBLEBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			DisassembleBillSysNo  = oResp.DisassembleBillSysNo;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendAddDisassembleBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CDisassembleBillDdo& DisassembleBillInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoAddDisassembleBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.DisassembleBillInfo = DisassembleBillInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvAddDisassembleBill(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& DisassembleBillSysNo
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDDISASSEMBLEBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDDISASSEMBLEBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			DisassembleBillSysNo  = oResp.DisassembleBillSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvAddDisassembleBill(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& DisassembleBillSysNo
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			DisassembleBillSysNo  = oResp.DisassembleBillSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetAddDisassembleBillRespCmd(
	)
	{	    
	    return STORAGEDAO_ADDDISASSEMBLEBILL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::AddLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CLoseBillDdo& LoseBillInfo,
				const erp::storage::ddo::COverFlowBillDdo& OverFlowBillInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& OverFlowBillSysNo
	)
	{
	    CStorageDaoAddLoseBillOrOverFlowBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.LoseBillInfo = LoseBillInfo;
			oReq.OverFlowBillInfo = OverFlowBillInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
			oReq.OverFlowBillSysNo = OverFlowBillSysNo;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDLOSEBILLOROVERFLOWBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDLOSEBILLOROVERFLOWBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			OverFlowBillSysNo  = oResp.OverFlowBillSysNo;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendAddLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CLoseBillDdo& LoseBillInfo,
				const erp::storage::ddo::COverFlowBillDdo& OverFlowBillInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoAddLoseBillOrOverFlowBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.LoseBillInfo = LoseBillInfo;
			oReq.OverFlowBillInfo = OverFlowBillInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvAddLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& OverFlowBillSysNo
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDLOSEBILLOROVERFLOWBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDLOSEBILLOROVERFLOWBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			OverFlowBillSysNo  = oResp.OverFlowBillSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvAddLoseBillOrOverFlowBill(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& OverFlowBillSysNo
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			OverFlowBillSysNo  = oResp.OverFlowBillSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetAddLoseBillOrOverFlowBillRespCmd(
	)
	{	    
	    return STORAGEDAO_ADDLOSEBILLOROVERFLOWBILL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::AddStock(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockDdo& StockInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& StockSysNo
	)
	{
	    CStorageDaoAddStockReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockInfo = StockInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
			oReq.StockSysNo = StockSysNo;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDSTOCK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDSTOCK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockSysNo  = oResp.StockSysNo;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendAddStock(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockDdo& StockInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoAddStockReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockInfo = StockInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvAddStock(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& StockSysNo
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDSTOCK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDSTOCK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockSysNo  = oResp.StockSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvAddStock(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& StockSysNo
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockSysNo  = oResp.StockSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetAddStockRespCmd(
	)
	{	    
	    return STORAGEDAO_ADDSTOCK_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::AddStockCheck(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockCheckMasterDdo& StockCheckMasterInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& StockCheckMasterSysNo
	)
	{
	    CStorageDaoAddStockCheckReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockCheckMasterInfo = StockCheckMasterInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
			oReq.StockCheckMasterSysNo = StockCheckMasterSysNo;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDSTOCKCHECK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDSTOCKCHECK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockCheckMasterSysNo  = oResp.StockCheckMasterSysNo;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendAddStockCheck(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockCheckMasterDdo& StockCheckMasterInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoAddStockCheckReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockCheckMasterInfo = StockCheckMasterInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvAddStockCheck(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& StockCheckMasterSysNo
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_ADDSTOCKCHECK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_ADDSTOCKCHECK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockCheckMasterSysNo  = oResp.StockCheckMasterSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvAddStockCheck(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve,
				uint64_t& StockCheckMasterSysNo
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoAddStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockCheckMasterSysNo  = oResp.StockCheckMasterSysNo;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetAddStockCheckRespCmd(
	)
	{	    
	    return STORAGEDAO_ADDSTOCKCHECK_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::DeleteDisassembleBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& DisassemblebillSysNos,
				const std::string& inReserve,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
	    CStorageDaoDeleteDisassembleBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.DisassemblebillSysNos = DisassemblebillSysNos;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.errorCode = errorCode;
			oReq.errorMsg = errorMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETEDISASSEMBLEBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETEDISASSEMBLEBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendDeleteDisassembleBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& DisassemblebillSysNos,
				const std::string& inReserve
	)
	{
	    CStorageDaoDeleteDisassembleBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.DisassemblebillSysNos = DisassemblebillSysNos;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvDeleteDisassembleBill(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETEDISASSEMBLEBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETEDISASSEMBLEBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvDeleteDisassembleBill(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetDeleteDisassembleBillRespCmd(
	)
	{	    
	    return STORAGEDAO_DELETEDISASSEMBLEBILL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::DeleteLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& FLoseBillSysNo,
				const std::set<uint64_t >& FOverFlowBillSysNo,
				const std::string& inReserve,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
	    CStorageDaoDeleteLoseBillOrOverFlowBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.FLoseBillSysNo = FLoseBillSysNo;
			oReq.FOverFlowBillSysNo = FOverFlowBillSysNo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.errorCode = errorCode;
			oReq.errorMsg = errorMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETELOSEBILLOROVERFLOWBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETELOSEBILLOROVERFLOWBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendDeleteLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& FLoseBillSysNo,
				const std::set<uint64_t >& FOverFlowBillSysNo,
				const std::string& inReserve
	)
	{
	    CStorageDaoDeleteLoseBillOrOverFlowBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.FLoseBillSysNo = FLoseBillSysNo;
			oReq.FOverFlowBillSysNo = FOverFlowBillSysNo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvDeleteLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETELOSEBILLOROVERFLOWBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETELOSEBILLOROVERFLOWBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvDeleteLoseBillOrOverFlowBill(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetDeleteLoseBillOrOverFlowBillRespCmd(
	)
	{	    
	    return STORAGEDAO_DELETELOSEBILLOROVERFLOWBILL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::DeleteStock(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& FStockSysNo,
				const std::string& inReserve,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
	    CStorageDaoDeleteStockReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.FStockSysNo = FStockSysNo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.errorCode = errorCode;
			oReq.errorMsg = errorMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETESTOCK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETESTOCK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendDeleteStock(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& FStockSysNo,
				const std::string& inReserve
	)
	{
	    CStorageDaoDeleteStockReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.FStockSysNo = FStockSysNo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvDeleteStock(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETESTOCK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETESTOCK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvDeleteStock(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetDeleteStockRespCmd(
	)
	{	    
	    return STORAGEDAO_DELETESTOCK_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::DeleteStockCheck(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& StockCheckMasterSysNos,
				const std::string& inReserve,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
	    CStorageDaoDeleteStockCheckReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockCheckMasterSysNos = StockCheckMasterSysNos;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.errorCode = errorCode;
			oReq.errorMsg = errorMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETESTOCKCHECK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETESTOCKCHECK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendDeleteStockCheck(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const std::set<uint64_t >& StockCheckMasterSysNos,
				const std::string& inReserve
	)
	{
	    CStorageDaoDeleteStockCheckReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockCheckMasterSysNos = StockCheckMasterSysNos;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvDeleteStockCheck(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_DELETESTOCKCHECK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_DELETESTOCKCHECK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvDeleteStockCheck(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::map<uint64_t,uint32_t >& errorCode,
				std::map<uint64_t,std::string >& errorMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoDeleteStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			errorCode  = oResp.errorCode;
			errorMsg  = oResp.errorMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetDeleteStockCheckRespCmd(
	)
	{	    
	    return STORAGEDAO_DELETESTOCKCHECK_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetDisassembleBillBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& DisassembleBillSysnoList,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CDisassembleBillDdo >& DisassembleBillList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetDisassembleBillBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.DisassembleBillSysnoList = DisassembleBillSysnoList;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.DisassembleBillList = DisassembleBillList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETDISASSEMBLEBILLBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETDISASSEMBLEBILLBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetDisassembleBillBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			DisassembleBillList  = oResp.DisassembleBillList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetDisassembleBillBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& DisassembleBillSysnoList,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetDisassembleBillBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.DisassembleBillSysnoList = DisassembleBillSysnoList;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetDisassembleBillBySysNos(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CDisassembleBillDdo >& DisassembleBillList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETDISASSEMBLEBILLBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETDISASSEMBLEBILLBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetDisassembleBillBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			DisassembleBillList  = oResp.DisassembleBillList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetDisassembleBillBySysNos(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CDisassembleBillDdo >& DisassembleBillList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetDisassembleBillBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			DisassembleBillList  = oResp.DisassembleBillList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetDisassembleBillBySysNosRespCmd(
	)
	{	    
	    return STORAGEDAO_GETDISASSEMBLEBILLBYSYSNOS_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetDisassembleBillList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::CDisassembleBillFilterDdo& DisassembleBillFilter,
				const std::string& inReserve,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CDisassembleBillDdo >& DisassembleBillList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetDisassembleBillListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.DisassembleBillFilter = DisassembleBillFilter;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.total = total;
			oReq.DisassembleBillList = DisassembleBillList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETDISASSEMBLEBILLLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETDISASSEMBLEBILLLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetDisassembleBillListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			DisassembleBillList  = oResp.DisassembleBillList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetDisassembleBillList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::CDisassembleBillFilterDdo& DisassembleBillFilter,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetDisassembleBillListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.DisassembleBillFilter = DisassembleBillFilter;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetDisassembleBillList(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CDisassembleBillDdo >& DisassembleBillList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETDISASSEMBLEBILLLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETDISASSEMBLEBILLLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetDisassembleBillListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			DisassembleBillList  = oResp.DisassembleBillList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetDisassembleBillList(
				CCmdObj& rCmd,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CDisassembleBillDdo >& DisassembleBillList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetDisassembleBillListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			DisassembleBillList  = oResp.DisassembleBillList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetDisassembleBillListRespCmd(
	)
	{	    
	    return STORAGEDAO_GETDISASSEMBLEBILLLIST_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetLoseBillOrOverFlowBillBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& LoseBillSysNoList,
				const std::set<uint64_t >& OverFlowSysNoList,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CLoseBillDdo >& LoseBillList,
				std::vector<erp::storage::ddo::COverFlowBillDdo >& OverFlowList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetLoseBillOrOverFlowBillBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.LoseBillSysNoList = LoseBillSysNoList;
			oReq.OverFlowSysNoList = OverFlowSysNoList;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.LoseBillList = LoseBillList;
			oReq.OverFlowList = OverFlowList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETLOSEBILLOROVERFLOWBILLBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETLOSEBILLOROVERFLOWBILLBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetLoseBillOrOverFlowBillBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			LoseBillList  = oResp.LoseBillList;
			OverFlowList  = oResp.OverFlowList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetLoseBillOrOverFlowBillBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& LoseBillSysNoList,
				const std::set<uint64_t >& OverFlowSysNoList,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetLoseBillOrOverFlowBillBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.LoseBillSysNoList = LoseBillSysNoList;
			oReq.OverFlowSysNoList = OverFlowSysNoList;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetLoseBillOrOverFlowBillBySysNos(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CLoseBillDdo >& LoseBillList,
				std::vector<erp::storage::ddo::COverFlowBillDdo >& OverFlowList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETLOSEBILLOROVERFLOWBILLBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETLOSEBILLOROVERFLOWBILLBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetLoseBillOrOverFlowBillBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			LoseBillList  = oResp.LoseBillList;
			OverFlowList  = oResp.OverFlowList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetLoseBillOrOverFlowBillBySysNos(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CLoseBillDdo >& LoseBillList,
				std::vector<erp::storage::ddo::COverFlowBillDdo >& OverFlowList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetLoseBillOrOverFlowBillBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			LoseBillList  = oResp.LoseBillList;
			OverFlowList  = oResp.OverFlowList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetLoseBillOrOverFlowBillBySysNosRespCmd(
	)
	{	    
	    return STORAGEDAO_GETLOSEBILLOROVERFLOWBILLBYSYSNOS_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetLoseBillOrOverFlowBillList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::COverFlowBillOrLoseBillFilterDdo& OverFlowBillOrLoseBillFilter,
				const std::string& inReserve,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CLoseBillDdo >& LoseBillList,
				std::vector<erp::storage::ddo::COverFlowBillDdo >& OverFlowList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetLoseBillOrOverFlowBillListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.OverFlowBillOrLoseBillFilter = OverFlowBillOrLoseBillFilter;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.total = total;
			oReq.LoseBillList = LoseBillList;
			oReq.OverFlowList = OverFlowList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETLOSEBILLOROVERFLOWBILLLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETLOSEBILLOROVERFLOWBILLLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetLoseBillOrOverFlowBillListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			LoseBillList  = oResp.LoseBillList;
			OverFlowList  = oResp.OverFlowList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetLoseBillOrOverFlowBillList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::COverFlowBillOrLoseBillFilterDdo& OverFlowBillOrLoseBillFilter,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetLoseBillOrOverFlowBillListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.OverFlowBillOrLoseBillFilter = OverFlowBillOrLoseBillFilter;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetLoseBillOrOverFlowBillList(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CLoseBillDdo >& LoseBillList,
				std::vector<erp::storage::ddo::COverFlowBillDdo >& OverFlowList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETLOSEBILLOROVERFLOWBILLLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETLOSEBILLOROVERFLOWBILLLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetLoseBillOrOverFlowBillListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			LoseBillList  = oResp.LoseBillList;
			OverFlowList  = oResp.OverFlowList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetLoseBillOrOverFlowBillList(
				CCmdObj& rCmd,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CLoseBillDdo >& LoseBillList,
				std::vector<erp::storage::ddo::COverFlowBillDdo >& OverFlowList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetLoseBillOrOverFlowBillListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			LoseBillList  = oResp.LoseBillList;
			OverFlowList  = oResp.OverFlowList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetLoseBillOrOverFlowBillListRespCmd(
	)
	{	    
	    return STORAGEDAO_GETLOSEBILLOROVERFLOWBILLLIST_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetStockBranch_RelBySysNo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				uint64_t StockSysNo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve,
				std::vector<erp::storage::ddo::CStockBranch_RelDdo >& StockBranchList
	)
	{
	    CStorageDaoGetStockBranch_RelBySysNoReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockSysNo = StockSysNo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
			oReq.StockBranchList = StockBranchList;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKBRANCH_RELBYSYSNO_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKBRANCH_RELBYSYSNO_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockBranch_RelBySysNoResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockBranchList  = oResp.StockBranchList;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetStockBranch_RelBySysNo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				uint64_t StockSysNo,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetStockBranch_RelBySysNoReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockSysNo = StockSysNo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetStockBranch_RelBySysNo(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve,
				std::vector<erp::storage::ddo::CStockBranch_RelDdo >& StockBranchList
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKBRANCH_RELBYSYSNO_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKBRANCH_RELBYSYSNO_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockBranch_RelBySysNoResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockBranchList  = oResp.StockBranchList;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetStockBranch_RelBySysNo(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve,
				std::vector<erp::storage::ddo::CStockBranch_RelDdo >& StockBranchList
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockBranch_RelBySysNoResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
			StockBranchList  = oResp.StockBranchList;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetStockBranch_RelBySysNoRespCmd(
	)
	{	    
	    return STORAGEDAO_GETSTOCKBRANCH_RELBYSYSNO_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetStockBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& StockSysnoList,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CStockDdo >& StockList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetStockBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockSysnoList = StockSysnoList;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.StockList = StockList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			StockList  = oResp.StockList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetStockBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& StockSysnoList,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetStockBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockSysnoList = StockSysnoList;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetStockBySysNos(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CStockDdo >& StockList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			StockList  = oResp.StockList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetStockBySysNos(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CStockDdo >& StockList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			StockList  = oResp.StockList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetStockBySysNosRespCmd(
	)
	{	    
	    return STORAGEDAO_GETSTOCKBYSYSNOS_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetStockCheckBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& StockCheckMasterSysNoList,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CStockCheckMasterDdo >& StockCheckList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetStockCheckBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockCheckMasterSysNoList = StockCheckMasterSysNoList;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.StockCheckList = StockCheckList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKCHECKBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKCHECKBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockCheckBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			StockCheckList  = oResp.StockCheckList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetStockCheckBySysNos(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& StockCheckMasterSysNoList,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetStockCheckBySysNosReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockCheckMasterSysNoList = StockCheckMasterSysNoList;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetStockCheckBySysNos(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CStockCheckMasterDdo >& StockCheckList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKCHECKBYSYSNOS_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKCHECKBYSYSNOS_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockCheckBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			StockCheckList  = oResp.StockCheckList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetStockCheckBySysNos(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::vector<erp::storage::ddo::CStockCheckMasterDdo >& StockCheckList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockCheckBySysNosResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			StockCheckList  = oResp.StockCheckList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetStockCheckBySysNosRespCmd(
	)
	{	    
	    return STORAGEDAO_GETSTOCKCHECKBYSYSNOS_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetStockCheckList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::CStockCheckFilterDdo& StockCheckFilter,
				const std::string& inReserve,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CStockCheckMasterDdo >& StockCheckList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetStockCheckListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockCheckFilter = StockCheckFilter;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.total = total;
			oReq.StockCheckList = StockCheckList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKCHECKLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKCHECKLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockCheckListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			StockCheckList  = oResp.StockCheckList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetStockCheckList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::CStockCheckFilterDdo& StockCheckFilter,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetStockCheckListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockCheckFilter = StockCheckFilter;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetStockCheckList(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CStockCheckMasterDdo >& StockCheckList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKCHECKLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKCHECKLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockCheckListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			StockCheckList  = oResp.StockCheckList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetStockCheckList(
				CCmdObj& rCmd,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CStockCheckMasterDdo >& StockCheckList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockCheckListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			StockCheckList  = oResp.StockCheckList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetStockCheckListRespCmd(
	)
	{	    
	    return STORAGEDAO_GETSTOCKCHECKLIST_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::GetStockList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::CStockFilterDdo& StockFilter,
				const std::string& inReserve,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CStockDdo >& StockList,
				std::string& outReserve
	)
	{
	    CStorageDaoGetStockListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockFilter = StockFilter;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.total = total;
			oReq.StockList = StockList;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			StockList  = oResp.StockList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendGetStockList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::storage::ddo::CStockFilterDdo& StockFilter,
				const std::string& inReserve
	)
	{
	    CStorageDaoGetStockListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.StockFilter = StockFilter;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvGetStockList(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CStockDdo >& StockList,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_GETSTOCKLIST_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_GETSTOCKLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			StockList  = oResp.StockList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvGetStockList(
				CCmdObj& rCmd,
				std::string& errmsg,
				uint32_t& total,
				std::vector<erp::storage::ddo::CStockDdo >& StockList,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoGetStockListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			total  = oResp.total;
			StockList  = oResp.StockList;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetGetStockListRespCmd(
	)
	{	    
	    return STORAGEDAO_GETSTOCKLIST_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::ModifyStockBranch_Rel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				uint64_t StockSysNo,
				const std::set<uint64_t >& BranchSysNos,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
	    CStorageDaoModifyStockBranch_RelReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockSysNo = StockSysNo;
			oReq.BranchSysNos = BranchSysNos;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_MODIFYSTOCKBRANCH_REL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_MODIFYSTOCKBRANCH_REL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoModifyStockBranch_RelResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendModifyStockBranch_Rel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				uint64_t StockSysNo,
				const std::set<uint64_t >& BranchSysNos,
				const std::string& inReserve
	)
	{
	    CStorageDaoModifyStockBranch_RelReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockSysNo = StockSysNo;
			oReq.BranchSysNos = BranchSysNos;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvModifyStockBranch_Rel(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_MODIFYSTOCKBRANCH_REL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_MODIFYSTOCKBRANCH_REL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoModifyStockBranch_RelResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvModifyStockBranch_Rel(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoModifyStockBranch_RelResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetModifyStockBranch_RelRespCmd(
	)
	{	    
	    return STORAGEDAO_MODIFYSTOCKBRANCH_REL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::UpdataDisassembleBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CDisassembleBillDdo& DisassembleBillInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
	    CStorageDaoUpdataDisassembleBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.DisassembleBillInfo = DisassembleBillInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATADISASSEMBLEBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATADISASSEMBLEBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendUpdataDisassembleBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CDisassembleBillDdo& DisassembleBillInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoUpdataDisassembleBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.DisassembleBillInfo = DisassembleBillInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvUpdataDisassembleBill(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATADISASSEMBLEBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATADISASSEMBLEBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvUpdataDisassembleBill(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataDisassembleBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetUpdataDisassembleBillRespCmd(
	)
	{	    
	    return STORAGEDAO_UPDATADISASSEMBLEBILL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::UpdataLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CLoseBillDdo& LoseBillInfo,
				const erp::storage::ddo::COverFlowBillDdo& OverFlowBillInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
	    CStorageDaoUpdataLoseBillOrOverFlowBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.LoseBillInfo = LoseBillInfo;
			oReq.OverFlowBillInfo = OverFlowBillInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATALOSEBILLOROVERFLOWBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATALOSEBILLOROVERFLOWBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendUpdataLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CLoseBillDdo& LoseBillInfo,
				const erp::storage::ddo::COverFlowBillDdo& OverFlowBillInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoUpdataLoseBillOrOverFlowBillReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.LoseBillInfo = LoseBillInfo;
			oReq.OverFlowBillInfo = OverFlowBillInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvUpdataLoseBillOrOverFlowBill(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATALOSEBILLOROVERFLOWBILL_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATALOSEBILLOROVERFLOWBILL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvUpdataLoseBillOrOverFlowBill(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataLoseBillOrOverFlowBillResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetUpdataLoseBillOrOverFlowBillRespCmd(
	)
	{	    
	    return STORAGEDAO_UPDATALOSEBILLOROVERFLOWBILL_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::UpdataStockCheck(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockCheckMasterDdo& StockCheckMasterInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
	    CStorageDaoUpdataStockCheckReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockCheckMasterInfo = StockCheckMasterInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATASTOCKCHECK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATASTOCKCHECK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendUpdataStockCheck(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockCheckMasterDdo& StockCheckMasterInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoUpdataStockCheckReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockCheckMasterInfo = StockCheckMasterInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvUpdataStockCheck(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATASTOCKCHECK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATASTOCKCHECK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvUpdataStockCheck(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdataStockCheckResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetUpdataStockCheckRespCmd(
	)
	{	    
	    return STORAGEDAO_UPDATASTOCKCHECK_RESP_CMD_ID;
	}	
	
	uint32_t CStorageDaoStub4App::UpdateStock(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockDdo& StockInfo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
	    CStorageDaoUpdateStockReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockInfo = StockInfo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATESTOCK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATESTOCK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdateStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CStorageDaoStub4App::SendUpdateStock(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t option,
				const erp::storage::ddo::CStockDdo& StockInfo,
				const std::string& inReserve
	)
	{
	    CStorageDaoUpdateStockReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.StockInfo = StockInfo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CStorageDaoStub4App::RecvUpdateStock(
				const CCntlInfo& rCntlInfo,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(STORAGEDAO_UPDATESTOCK_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << STORAGEDAO_UPDATESTOCK_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdateStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::RecvUpdateStock(
				CCmdObj& rCmd,
				std::string& errmsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CStorageDaoUpdateStockResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CStorageDaoStub4App::GetUpdateStockRespCmd(
	)
	{	    
	    return STORAGEDAO_UPDATESTOCK_RESP_CMD_ID;
	}	
